/*
            Character
                |
    ----------------------------
    Hunter, Kolobok, Bird, Zomby
*/
#ifndef _CHARACTER_H
#define _CHARACTER_H

#define STATE_STILL 1
#define STATE_MOVE 2
#define STATE_FALL 3
#define STATE_JUMP 4
#define STATE_DEAD 5
#define STATE_ATTACK 7

struct Point2;
class Animation;
class Source;
class Level;
class AI;
class Rect;

class Character{

public:
	Character();
	~Character();

	Point2* velocity;	
	Point2* position;	
	Point2* orientation;

	int layer;
	Animation* cur_animation;
	Source* src_death;
	Source* src_move;
	Source* src_fall;
	AI* ai;

	bool active;

	int state;	
	bool new_frame;
	bool mirrored;
	float speed;

	bool moveXplus;
	bool moveXminus;
	bool moveYplus;
	bool moveYminus;
	bool attack;
	bool special;
	bool special2;

	float head_level;

//	void (*set_func)(Level* level, Point2* acc, float dt);

	void getCenter(Point2* center);
	float getCenterX();
	float getCenterY();

//	virtual void setState(void (Character::*setStill)(int), int argument) =0;
	virtual void update(Level* level, Point2* acc, float dt) =0;
	virtual void setStill(int argument) =0;
	virtual void setMove(int argument) =0;
	virtual void setJump(int argument) =0;
	virtual void setFall(int argument) =0;
	virtual void setDead(int argument) =0;
	virtual void setAttack(int argument) =0;

	virtual float get_xLo()=0;
	virtual float get_xHi()=0;
	virtual float get_yLo()=0;
	virtual float get_yHi()=0;
	virtual float get_pic_xLo()=0;
	virtual float get_pic_xHi()=0;
	virtual float get_pic_yLo()=0;
	virtual float get_pic_yHi()=0;

	virtual Rect* getBox()=0;
	virtual Rect* getBody()=0;
};

#endif
